feat(FR-2891): move resource group to deployment metadata, wire new ModelReplica status fields#7407
Merged
Conversation
3 tasks
This was referenced May 13, 2026
Contributor
Author
5 tasks
Contributor
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aligns the WebUI with the serving schema change that makes resource group a deployment-level property (rather than revision-level), while refining several deployment UIs (detail layout, list columns, replicas table) and expanding replica-status localization.
Changes:
- Update GraphQL schema and revision flows so revisions can inherit the deployment resource group; preset-driven revisions can omit cluster/resource/image/runtime configs.
- Refine deployment UIs: separate Deployment Name vs Deployment ID, merge current revision “Revision (ID)”, add Deployment ID column in the list, and enhance Replicas tab with Session (via
sessionV2) and Revision link drawer. - Add replica lifecycle statuses (
WARMING_UP,RUNNING,FAILED_TO_START) toReplicaStatusTagand update i18n strings across locales.
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| resources/i18n/de.json | Remove NameAndID; add/adjust replica status strings/tooltips. |
| resources/i18n/el.json | Remove NameAndID; add/adjust replica status strings/tooltips. |
| resources/i18n/en.json | Remove NameAndID; add/adjust replica status strings/tooltips. |
| resources/i18n/es.json | Remove NameAndID; add/adjust replica status strings/tooltips. |
| resources/i18n/fi.json | Remove NameAndID; add/adjust replica status strings/tooltips. |
| resources/i18n/fr.json | Remove NameAndID; add/adjust replica status strings/tooltips. |
| resources/i18n/id.json | Remove NameAndID; add/adjust replica status strings/tooltips. |
| resources/i18n/it.json | Remove NameAndID; add/adjust replica status strings/tooltips. |
| resources/i18n/ja.json | Remove NameAndID; add/adjust replica status strings/tooltips. |
| resources/i18n/ko.json | Remove NameAndID; add/adjust replica status strings/tooltips. |
| resources/i18n/mn.json | Remove NameAndID; add/adjust replica status strings/tooltips. |
| resources/i18n/ms.json | Remove NameAndID; add/adjust replica status strings/tooltips. |
| resources/i18n/pl.json | Remove NameAndID; add/adjust replica status strings/tooltips. |
| resources/i18n/pt.json | Remove NameAndID; add/adjust replica status strings/tooltips. |
| resources/i18n/pt-BR.json | Remove NameAndID; add/adjust replica status strings/tooltips. |
| resources/i18n/ru.json | Remove NameAndID; add/adjust replica status strings/tooltips. |
| resources/i18n/th.json | Remove NameAndID; add/adjust replica status strings/tooltips. |
| resources/i18n/tr.json | Remove NameAndID; add/adjust replica status strings/tooltips. |
| resources/i18n/vi.json | Remove NameAndID; add/adjust replica status strings/tooltips. |
| resources/i18n/zh-CN.json | Remove NameAndID; add/adjust replica status strings/tooltips. |
| resources/i18n/zh-TW.json | Remove NameAndID; add/adjust replica status strings/tooltips. |
| react/src/components/SessionFormItems/ResourceAllocationFormItems.tsx | Add hideResourceGroupFormItem to support “hidden but mounted” RG selection in revision flow. |
| react/src/components/ReplicaStatusTag.tsx | Add new statuses + tooltip keys; show spinner icon for WARMING_UP. |
| react/src/components/DeploymentSettingModal.tsx | Collect RG on create and show read-only RG on edit; query current revision RG name. |
| react/src/components/DeploymentRevisionDetail.tsx | Add mergeRevisionInfo option to render “Revision (ID)” combined row. |
| react/src/components/DeploymentReplicasTab.tsx | Add Status placeholder column, Session via sessionV2, Revision drawer link; add status filter options. |
| react/src/components/DeploymentList.tsx | Add Deployment ID column and enable copy for name cell. |
| react/src/components/DeploymentConfigurationSection.tsx | Split “Name” and “Deployment ID” rows; merge revision info in current revision view. |
| react/src/components/DeploymentAddRevisionModal.tsx | Remove RG picker; preset mode now adds a revision (not deploy/create); keep hidden RG state for preset filtering. |
| data/schema.graphql | Move RG to ModelDeploymentMetadataInput; remove ResourceConfigInput.resourceGroup; make revision configs nullable in AddRevisionInput. |
Comments suppressed due to low confidence (1)
react/src/components/DeploymentReplicasTab.tsx:229
WARMING_UPis included in the status filter options even though the comment notes the backend filter currently rejects it. Selecting this option will generate aReplicaFilter.status = WARMING_UPquery and likely surface an API error / empty state. Remove this option until the backend accepts it, or guard filter serialization so unsupported enum values are not sent.
const replicaStatusOptions = [
{ label: t('replicaStatus.Provisioning'), value: 'PROVISIONING' },
// TODO(needs-backend): include `WARMING_UP` in the filter options once
// the `ReplicaStatus` enum exposes it. Listed here for UI completeness
// but the backend filter currently rejects it.
{ label: t('replicaStatus.WarmingUp'), value: 'WARMING_UP' },
{ label: t('replicaStatus.Running'), value: 'RUNNING' },
{ label: t('replicaStatus.Terminating'), value: 'TERMINATING' },
{ label: t('replicaStatus.Terminated'), value: 'TERMINATED' },
{ label: t('replicaStatus.FailedToStart'), value: 'FAILED_TO_START' },
];
54c0701 to
9d37418
Compare
Contributor
Author
|
Addressed feedback from @copilot-pull-request-reviewer:
Also added a Resource Group row in the deployment overview Descriptions so the value is visible alongside Domain / Project. |
cec75b6 to
40756c0
Compare
6afc3c2 to
1909c9e
Compare
ffd3228 to
057a90e
Compare
fead57c to
5a68a98
Compare
918cbb1 to
c7aa965
Compare
132ffac to
a5fa2af
Compare
0928392 to
5bc69d5
Compare
Contributor
Coverage Report for backend-ai-ui-coverage (./packages/backend.ai-ui)
File Coverage
|
||||||||||||||||||||||||||||||||||||||
e7d01c1 to
473f3fb
Compare
Merged
4 tasks
dc98ec8 to
e2b6b31
Compare
a5fa2af to
1f3f171
Compare
Merge activity
|
…odelReplica status fields (#7407) Resolves #7406 ([FR-2891](https://lablup.atlassian.net/browse/FR-2891)) ## Summary ### Schema - **`ModelDeploymentMetadata`** gains `resourceGroupName: String!` and `resourceGroup: ResourceGroup` (DataLoader-resolved). Resource group now lives at the deployment level rather than per revision. - **`ResourceConfigInput.resourceGroup` removed** and **`ModelDeploymentMetadataInput.resourceGroup`** added. - **`AddRevisionInput`** — `clusterConfig` / `resourceConfig` / `image` / `modelRuntimeConfig` become nullable so preset-driven revisions can submit minimal payloads. - **`AddRevisionInput.name` / `CreateRevisionInput.name` removed**. - **`ModelReplica`** gains `status: ReplicaStatus!`, `trafficStatus: TrafficStatus!`, `healthStatus: ReplicaHealthStatus!`; new `ReplicaHealthStatus` enum (`NOT_CHECKED | HEALTHY | UNHEALTHY | DEGRADED`). - **`ModelMountConfig.subpath`** and **`ExtraVFolderMountInfoGQL.subpath`** added (intentionally not surfaced in UI — deferred to a follow-up). - **`Query.inferenceRuntimeConfigs` / `inferenceRuntimeConfig`** deprecated; **`ModelRuntimeConfigInput.inferenceRuntimeConfig` removed**. WebUI no longer surfaces these. ### UI — deployment creation / edit - **`DeploymentSettingModal`** collects the resource group via `BAIProjectResourceGroupSelect`; edit mode renders the current RG as read-only text. - **`DeploymentAddRevisionModal`** hides the resource group selector (revisions inherit the RG from the deployment via `hideResourceGroupFormItem` on `ResourceAllocationFormItems`). The hidden picker still drives `ResourcePresetSelect` filtering. - **Preset mode** in `DeploymentAddRevisionModal` calls `addModelRevision(revisionPresetId, modelMountConfig, options.autoActivate)` instead of `deployVfolderV2` — the modal is only opened from an existing deployment, so it must add a revision, not create a new deployment. - Dead `commitDeploy` / `DeploymentAddRevisionModalDeployMutation` block left over after the FR-2862 preset-mode refactor is removed; `isSubmitting` now collapses to `isAddInFlight`. ### UI — preset detail modal (architecture) - **`DeploymentPresetDetailModal` switched to `useFragment`** — the modal now accepts `presetFrgmt: DeploymentPresetDetailModalFragment$key | null | undefined` instead of owning its own `useLazyLoadQuery`. The previous shell-vs-body split is collapsed back into a single component because `useFragment(query, null)` tolerates the null input that the close-animation lifecycle produces. - **List-query callers (`ModelCardDeployModal`, `VFolderDeployModal`)** spread `...DeploymentPresetDetailModalFragment` on the existing `availablePresets` / `deploymentRevisionPresets` edge nodes. No extra fetch — when the user opens the detail view, the matching edge node is handed to the modal as `presetFrgmt`. - **Paginated-select caller (`DeploymentAddRevisionModal`)** cannot list-spread because `BAIAvailablePresetSelect` paginates independently. A small inner component (`PresetDetailLoader`) fires a singular `deploymentRevisionPreset(id:)` query when invoked and forwards the fragment ref to the modal. - This is the team-approved pattern per Seungwon's review feedback (Teams thread, FR-2862 follow-up). ### UI — deployment detail - **Basic Information** now shows Resource Group sourced from `metadata.resourceGroupName`; Name / Deployment ID rows are split for clarity. - **Deployment list** gains a Deployment ID column. - **Replicas tab**: - New **Status** column powered by `ModelReplica.status` (`PROVISIONING / RUNNING / TERMINATING / TERMINATED / FAILED_TO_START`) via `ReplicaStatusTag`. The earlier placeholder is removed. - **Health Status** column source moved from `livenessStatus` → new `healthStatus` field. - **Traffic Status** column (renamed from \"Active Pool\") source moved from `activenessStatus` → new `trafficStatus` field; uses `BAITag` with `success`/`default` semantic colors. - **Replica ID** column is sortable; default sort is `-createdAt` applied at query-build time (no URL key written), following the `ComputeSessionListPage` pattern. - Filter properties include both `status` and `trafficStatus`. - `Session` column resolves through `sessionV2` (BA-5838 workaround); `Revision` column opens `DeploymentRevisionDetailDrawer`. - **`ReplicaStatusTag`** extends its enum to cover `RUNNING` and `FAILED_TO_START` (with localized labels / tooltips across 22 locales). ## Test plan - [ ] Create a new deployment from `DeploymentSettingModal`; verify the resource group selector is required and `autoSelectDefault` picks the project default. - [ ] Open `DeploymentSettingModal` in edit mode on an existing deployment; verify the current resource group renders as read-only text. - [ ] On a deployment detail page, open Add Revision → Custom mode; verify the resource group form item is hidden but \`ResourcePresetSelect\` still filters by the deployment's RG. - [ ] In Add Revision → Preset mode, pick a preset and submit; verify a new revision is added to the current deployment (not a new deployment) and the modal closes without navigating away. - [ ] Toggle \`Auto activate\` in both Preset and Custom modes; verify \`AddRevisionOptions.autoActivate\` is forwarded in both branches. - [ ] Open the preset (i) detail modal from `ModelCardDeployModal`, `VFolderDeployModal`, and `DeploymentAddRevisionModal`; verify each shows the right preset details and closes cleanly without any \"preset not found\" flash during the close animation. - [ ] In `DeploymentAddRevisionModal` (Preset mode), scroll the preset selector past the first page, select a preset from a later page, then open the detail modal; verify the singular `deploymentRevisionPreset(id:)` query resolves and the detail renders. - [ ] Open Deployments list; verify the new Deployment ID column renders BAIId with copy affordance. - [ ] On deployment detail → Replicas tab, verify the three Status / Health Status / Traffic Status columns render real values from the new schema fields. - [ ] Open the page with no \`?rOrder=\` in the URL; verify replicas are sorted by \`createdAt\` descending and the \`Replica ID\` header has no sort arrow initially. - [ ] Click \`Created At\` header; verify ascend → descend → none cycle works and is reflected in URL + server query. - [ ] Click \`Replica ID\` header; verify it sorts and the URL \`?rOrder=\` updates. - [ ] Apply the \`status\` filter and the new \`trafficStatus\` filter; verify both narrow the table. - [ ] Open the Revision link in a replica row; verify \`DeploymentRevisionDetailDrawer\` opens with the revision detail. - [ ] Trigger replicas in \`FAILED_TO_START\` and \`RUNNING\` states; verify \`ReplicaStatusTag\` renders the right color/label/tooltip in en/ko. [FR-2891]: https://lablup.atlassian.net/browse/FR-2891?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
1f3f171 to
8a298f1
Compare
e2b6b31 to
aaff679
Compare
graphite-app Bot
pushed a commit
that referenced
this pull request
May 15, 2026
…ivate / auto-activate (#7428) Resolves #7427(FR-2901) Stacked on #7407. ## Summary After mutations that change a deployment's `currentRevisionId` / `deployingRevisionId`, the Relay store's deployment record can fall out of sync with the server, causing the row tags in the revision history table and the Configuration Section's "current / deploying" panels to drift apart from what the server thinks. Two specific gaps were addressed: - **`activateDeploymentRevision` (Revision History → Deploy)** — Mutation response previously returned only `deployment { id, currentRevisionId, currentRevision { id } }`. Extended to include `deployingRevisionId` and `...DeploymentRevisionDetail_revision` fragment on both `currentRevision` and `deployingRevision @SInCE(version: "26.4.3")`, so the normalized deployment record updates atomically. Consumers (`DeploymentDetailPage`, `DeploymentConfigurationSection`, `DeploymentRevisionHistoryTab` row tags) all share the same Relay store record and re-render on the next render pass. - **`addModelRevision` (Add Revision modal, both Preset and Custom modes)** — Now that the backend exposes `ModelRevision.deployment` (lablup/backend.ai#11631 / BA-6056), the mutation reaches into `revision.deployment @SInCE(version: "26.4.4")` and selects `currentRevisionId`, `deployingRevisionId`, `currentRevision`, `deployingRevision`, so the deployment node is updated unconditionally on every revision add. No `autoActivate` branching — Relay normalizes the shared deployment node either way. - The previous client-side `fetchQuery` workaround helper is removed. - The `revision` selection itself was reduced to `id` + `...DeploymentRevisionDetail_revision`. The previously inlined fields (`resourceConfig.resourceOpts`, `modelRuntimeConfig.runtimeVariantId`, `modelDefinition.models[].service.preStartActions / shell / healthCheck.expectedStatusCode`, etc.) were dead selections — none of the response handlers read them, and the actual consumers (`AdminDeploymentPresetSettingPageContent`, `AdminDeploymentPresetModelConfigItem`, `DeploymentPresetDetailModal`) have their own queries. - **`data/schema.graphql`** — Regenerated to add `ModelRevision.deploymentId: ID!` and `ModelRevision.deployment: ModelDeployment` per the merged backend PR. ## Test plan - [ ] Open a deployment detail with multiple revisions in the Revision History tab. Click **Deploy** on a non-current revision → confirm the "Current" / "배포중" row tags AND the Configuration Section's `currentRevision` / `deployingRevision` panels both update without a manual refresh. - [ ] From the same page open **Add Revision** modal in either Preset or Custom mode with **Auto activate ON** → submit → modal closes, success toast shows. Verify the Configuration Section moves to "deploying" state and the new revision appears as `deployingRevision` without a manual refresh. - [ ] Same flow with **Auto activate OFF** → deployment record is still refreshed by the mutation (no autoActivate branching). `deployingRevisionId` typically stays unchanged on the server side; UI should show the new revision in history without an orphan "deploying" state. - [ ] Backend lifecycle: leave the page idle while a deploying revision becomes current. The 5s `useInterval` polling in `DeploymentConfigurationSection` continues to work because `deployingRevision` is correctly populated immediately after the mutation. ## Backend dependency Requires backend manager with [lablup/backend.ai#11631](lablup/backend.ai#11631) (BA-6056) — `ModelRevision.deployment` / `ModelRevision.deploymentId`. Older managers without the field will see the `@since(version: "26.4.4")` directive strip the field at request time, falling back to no auto-update for `addModelRevision` (the activate path is unaffected).
Base automatically changed from
05-13-refactor_fr-2862_merge_deployment_content_components_into_modals
to
main
May 15, 2026 08:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Resolves #7406 (FR-2891)
Summary
Schema
ModelDeploymentMetadatagainsresourceGroupName: String!andresourceGroup: ResourceGroup(DataLoader-resolved). Resource group now lives at the deployment level rather than per revision.ResourceConfigInput.resourceGroupremoved andModelDeploymentMetadataInput.resourceGroupadded.AddRevisionInput—clusterConfig/resourceConfig/image/modelRuntimeConfigbecome nullable so preset-driven revisions can submit minimal payloads.AddRevisionInput.name/CreateRevisionInput.nameremoved.ModelReplicagainsstatus: ReplicaStatus!,trafficStatus: TrafficStatus!,healthStatus: ReplicaHealthStatus!; newReplicaHealthStatusenum (NOT_CHECKED | HEALTHY | UNHEALTHY | DEGRADED).ModelMountConfig.subpathandExtraVFolderMountInfoGQL.subpathadded (intentionally not surfaced in UI — deferred to a follow-up).Query.inferenceRuntimeConfigs/inferenceRuntimeConfigdeprecated;ModelRuntimeConfigInput.inferenceRuntimeConfigremoved. WebUI no longer surfaces these.UI — deployment creation / edit
DeploymentSettingModalcollects the resource group viaBAIProjectResourceGroupSelect; edit mode renders the current RG as read-only text.DeploymentAddRevisionModalhides the resource group selector (revisions inherit the RG from the deployment viahideResourceGroupFormItemonResourceAllocationFormItems). The hidden picker still drivesResourcePresetSelectfiltering.DeploymentAddRevisionModalcallsaddModelRevision(revisionPresetId, modelMountConfig, options.autoActivate)instead ofdeployVfolderV2— the modal is only opened from an existing deployment, so it must add a revision, not create a new deployment.commitDeploy/DeploymentAddRevisionModalDeployMutationblock left over after the FR-2862 preset-mode refactor is removed;isSubmittingnow collapses toisAddInFlight.UI — preset detail modal (architecture)
DeploymentPresetDetailModalswitched touseFragment— the modal now acceptspresetFrgmt: DeploymentPresetDetailModalFragment$key | null | undefinedinstead of owning its ownuseLazyLoadQuery. The previous shell-vs-body split is collapsed back into a single component becauseuseFragment(query, null)tolerates the null input that the close-animation lifecycle produces.ModelCardDeployModal,VFolderDeployModal) spread...DeploymentPresetDetailModalFragmenton the existingavailablePresets/deploymentRevisionPresetsedge nodes. No extra fetch — when the user opens the detail view, the matching edge node is handed to the modal aspresetFrgmt.DeploymentAddRevisionModal) cannot list-spread becauseBAIAvailablePresetSelectpaginates independently. A small inner component (PresetDetailLoader) fires a singulardeploymentRevisionPreset(id:)query when invoked and forwards the fragment ref to the modal.UI — deployment detail
metadata.resourceGroupName; Name / Deployment ID rows are split for clarity.ModelReplica.status(PROVISIONING / RUNNING / TERMINATING / TERMINATED / FAILED_TO_START) viaReplicaStatusTag. The earlier placeholder is removed.livenessStatus→ newhealthStatusfield.activenessStatus→ newtrafficStatusfield; usesBAITagwithsuccess/defaultsemantic colors.-createdAtapplied at query-build time (no URL key written), following theComputeSessionListPagepattern.statusandtrafficStatus.Sessioncolumn resolves throughsessionV2(BA-5838 workaround);Revisioncolumn opensDeploymentRevisionDetailDrawer.ReplicaStatusTagextends its enum to coverRUNNINGandFAILED_TO_START(with localized labels / tooltips across 22 locales).Test plan
DeploymentSettingModal; verify the resource group selector is required andautoSelectDefaultpicks the project default.DeploymentSettingModalin edit mode on an existing deployment; verify the current resource group renders as read-only text.ModelCardDeployModal,VFolderDeployModal, andDeploymentAddRevisionModal; verify each shows the right preset details and closes cleanly without any "preset not found" flash during the close animation.DeploymentAddRevisionModal(Preset mode), scroll the preset selector past the first page, select a preset from a later page, then open the detail modal; verify the singulardeploymentRevisionPreset(id:)query resolves and the detail renders.